<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人中心 - 宠物管理系统</title>
    <style>
        /* General CSS styles */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-image: url('../static/images/1.jpg');
            /* 替换为你的图片路径 */
            background-size: cover;
            background-position: center;
            background-color: #f3e9e9;
            /* 浅粉色背景 */
        }

        header {
            background-color: #333;
            color: #fff;
            padding: 10px 0;
            text-align: center;
            /* 居中对齐标题内容 */
        }

        header nav ul {
            list-style-type: none;
            margin: 0;
            padding: 0;
            text-align: center;
            /* 居中对齐导航链接 */
        }

        header nav ul li {
            display: inline;
            margin-right: 20px;
        }

        header nav ul li a {
            color: #fff;
            text-decoration: none;
            padding: 10px;
            /* 导航链接的内边距 */
            border-radius: 5px;
            /* 圆角 */
            transition: background-color 0.3s ease;
            /* 背景颜色平滑过渡 */
        }

        header nav ul li a:hover {
            background-color: seagreen;
            /* 鼠标悬停时的浅粉色背景 */
        }

        main {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 80vh;
            /* 使用最小高度以确保页面内容显示完整 */
            flex-direction: column;
            /* 垂直居中内容 */
        }

        .profile-container {
            background-color: rgba(255, 255, 255, 0.2);
            /* 调整更亮的透明度 */
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 300px;
            max-width: 90%;
            text-align: center;
            margin-top: 20px;
            /* 添加上边距，用于间隔 */
        }

        .profile-container h1 {
            text-align: center;
            margin-bottom: 20px;
        }

        .profile-info {
            text-align: left;
            margin-bottom: 15px;
        }

        .profile-info label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: #0a583c;
        }

        .profile-info span {
            font-size: 16px;
        }

        .profile-info a {
            color: #0a583c;
            text-decoration: none;
        }

        .profile-info a:hover {
            text-decoration: underline;
        }

        .logout-btn {
            display: block;
            width: 100%;
            padding: 12px;
            background-color: #f44336;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease;
            margin-top: 20px;
            text-decoration: none;
        }

        .logout-btn:hover {
            background-color: #d32f2f;
        }
    </style>
</head>

<body>
    <header>
        <nav>
            <ul>
                <li><a href="/">系统首页</a></li>
                <li><a href="/kind">宠物种类知识</a></li>
                <li><a href="/adopt">领养宠物页面</a></li>
                <li><a href="/Adoption">送养宠物页面</a></li>
                <li><a href="/Blogger">宠物博客交流中心</a></li>
                <li><a href="/PersonalCenter">个人中心</a></li>
            </ul>
        </nav>
    </header>
    <main>
        <div class="profile-container">
            <h1>个人中心</h1>
            <div class="profile-info">
                <label>用户名:</label>
                <span id="username">John Doe</span> <!-- 替换为从服务器获取的用户名 -->
            </div>
            <div class="profile-info">
                <label>邮箱:</label>
                <span id="email">john.doe@example.com</span> <!-- 替换为从服务器获取的邮箱 -->
            </div>
            <div class="profile-info">
                <label>账号信息:</label>
                <span id="account-info">用户账号信息</span> <!-- 根据需求显示用户的账号信息 -->
            </div>
            <div class="profile-info">
                <label>我的订单:</label>
                <span id="orders">订单列表</span> <!-- 根据需求显示用户的订单列表 -->
            </div>
            <div class="profile-info">
                <label>帮助中心:</label>
                <span><a href="#">查看帮助</a></span> <!-- 添加帮助中心链接 -->
            </div>
            <a href="/login" class="logout-btn">退出登录</a>
        </div>
    </main>
    <footer>
        <!-- 页脚内容 -->
    </footer>
    <script>
        // JavaScript for navigation redirection
        document.addEventListener("DOMContentLoaded", function () {
            var links = document.querySelectorAll("header nav ul li a");
            links.forEach(function (link) {
                link.addEventListener("click", function (event) {
                    event.preventDefault();
                    var targetPage = this.getAttribute("href");
                    window.location.href = targetPage;
                });
            });
        });
    </script>
</body>

</html>